19a8496f9cfa0aa861a09fbf6e4fded5cd6b80f4,sonar-batch/src/main/java/org/sonar/batch/issue/DeprecatedViolations.java,DeprecatedViolations,toIssue,#Violation#,50

Before Change


    issue.setComponentKey(violation.getResource().getEffectiveKey());
    issue.setKey(UUID.randomUUID().toString());
    issue.setRuleRepositoryKey(violation.getRule().getRepositoryKey());
    issue.setRuleKey(violation.getRule().getKey());
    issue.setCost(violation.getCost());
    issue.setChecksum(violation.getChecksum());
    issue.setCreatedAt(violation.getCreatedAt());

After Change


        .setComponentKey(violation.getResource().getEffectiveKey())
        .setKey(UUID.randomUUID().toString())
        .setRuleRepositoryKey(violation.getRule().getRepositoryKey())
        .setRuleKey(violation.getRule().getKey())
        .setCost(violation.getCost())
        .setLine(violation.getLineId())
        .setMessage(violation.getMessage())
        .setStatus(Issue.STATUS_OPEN);
    if (violation.getSeverity() != null) {
      issue.setSeverity(violation.getSeverity().name());
    }